package com.wisdudu.blank.data.bean;

import com.kelin.mvvmlight.base.ViewModel;
import com.kelin.mvvmlight.command.ReplyCommand;

import io.realm.RealmObject;
import io.realm.annotations.Ignore;
import io.realm.annotations.PrimaryKey;

public class PhotoEntity extends RealmObject implements ViewModel {
    @PrimaryKey
    private String photoid;
    private String title;
    private String thumbimg;
    private String originalimg;
    private String groupid;
    private String groupname;
    private String visible;
    public int index;
    @Ignore
    public onItemClickListener mOnItemClickListener;

    public void setOnItemClickListener(onItemClickListener onItemClickListener) {
        mOnItemClickListener = onItemClickListener;
    }

    @Ignore
    public ReplyCommand onItemclick = new ReplyCommand(() -> {
        mOnItemClickListener.onItemClick(PhotoEntity.this);
    });

    public String getPhotoid() {
        return photoid;
    }

    public void setPhotoid(String photoid) {
        this.photoid = photoid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getThumbimg() {
        return thumbimg;
    }

    public void setThumbimg(String thumbimg) {
        this.thumbimg = thumbimg;
    }

    public String getOriginalimg() {
        return originalimg;
    }

    public void setOriginalimg(String originalimg) {
        this.originalimg = originalimg;
    }

    public String getGroupid() {
        return groupid;
    }

    public void setGroupid(String groupid) {
        this.groupid = groupid;
    }

    public String getGroupname() {
        return groupname;
    }

    public void setGroupname(String groupname) {
        this.groupname = groupname;
    }

    public String getVisible() {
        return visible;
    }

    public void setVisible(String visible) {
        this.visible = visible;
    }

    public interface onItemClickListener {
        void onItemClick(PhotoEntity photoEntity);
    }
}